package com.itheima.streamdemo.myStream;

import java.util.ArrayList;
import java.util.Collections;

public class MyStreamDemo03 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list, "张三丰","张小丰", "张无忌", "张翠三", "王二麻子", "张良", "谢广坤");

        list.stream().filter(s -> s.startsWith("张")).filter(s -> s.length() == 3).
                filter(s -> s.endsWith("丰")).forEach(s -> System.out.println("s = " + s));
    }
}
